package cn.domob.android.ads;

import android.content.Context;
import java.util.HashMap;

class k
  implements p.a
{
  private static final String A = "pb[name]";
  private static final String B = "pb[version]";
  private static final String C = "d[coord_timestamp]";
  private static final String D = "d[coord]";
  private static final String E = "d[coord_acc]";
  private static final String F = "d[coord_status]";
  private static final String G = "d[pc]";
  private static final String H = "d[dob]";
  private static final String I = "d[gender]";
  private static final String J = "spot";
  private static final String K = "network";
  private static final String L = "lpkg";
  private static final String M = "or";
  private static final String N = "orv";
  private static final String O = "dma";
  private static final String P = "ama";
  private static final String Q = "lac";
  private static final String R = "cell";
  protected static final int a = 1;
  private static J b = new J(k.class.getSimpleName());
  private static final String f = "sdk";
  private static final String g = "rt";
  private static final String h = "pt";
  private static final String i = "ts";
  private static final String j = "ua";
  private static final String k = "ipb";
  private static final String l = "idv";
  private static final String m = "v";
  private static final String n = "sv";
  private static final String o = "l";
  private static final String p = "f";
  private static final String q = "e";
  private static final String r = "cid";
  private static final String s = "dim";
  private static final String t = "so";
  private static final String u = "sw";
  private static final String v = "sh";
  private static final String w = "sd";
  private static final String x = "c";
  private static final String y = "k";
  private static final String z = "pb[identifier]";
  private p c;
  private i d;
  private Context e;

  public k(i parami)
  {
    b.b("New instance of DomobAdRequest.");
    this.d = parami;
    this.e = parami.r();
  }

  private String b()
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("sdk", String.valueOf(1));
    localHashMap.put("rt", String.valueOf(1));
    localHashMap.put("ts", String.valueOf(System.currentTimeMillis()));
    localHashMap.put("ua", q.f(this.e));
    localHashMap.put("ipb", this.d.j());
    localHashMap.put("idv", q.g(this.e));
    localHashMap.put("v", String.format("%s-%s-%s", new Object[] { "20121128", "android", "20120321" }));
    localHashMap.put("sv", "030105");
    localHashMap.put("l", "zh");
    localHashMap.put("f", "jsonp");
    localHashMap.put("e", "UTF-8");
    localHashMap.put("cid", j.a().b(this.e));
    if (this.d.k() != 0)
      localHashMap.put("pt", String.valueOf(this.d.k()));
    if (this.d.l() != null)
      localHashMap.put("dim", this.d.l());
    localHashMap.put("so", q.s(this.e));
    localHashMap.put("sw", String.valueOf(q.v(this.e)));
    localHashMap.put("sh", String.valueOf(q.w(this.e)));
    localHashMap.put("sd", String.valueOf(q.u(this.e)));
    localHashMap.put("c", String.format("%s,%s,%s,%s,%s,%s,%s,%s", new Object[] { "gif", "ltx", "la", "hv", "expd", "iad", "spi", "mraid1" }));
    localHashMap.put("pb[identifier]", q.a(this.e));
    localHashMap.put("pb[name]", q.d(this.e));
    localHashMap.put("pb[version]", q.c(this.e));
    localHashMap.put("network", q.p(this.e));
    if (this.d.m() != null)
      localHashMap.put("k", this.d.m());
    String str = q.z(this.e);
    if (str != null)
    {
      localHashMap.put("d[coord_timestamp]", String.valueOf(q.e()));
      localHashMap.put("d[coord]", str);
      localHashMap.put("d[coord_acc]", String.valueOf(q.c()));
      localHashMap.put("lac", q.C(this.e));
      localHashMap.put("cell", q.D(this.e));
    }
    while (true)
    {
      if (this.d.n() != null)
        localHashMap.put("d[pc]", this.d.n());
      if (this.d.p() != null)
        localHashMap.put("d[dob]", this.d.p());
      if (this.d.o() != null)
        localHashMap.put("d[gender]", this.d.o());
      if (this.d.q() != null)
        localHashMap.put("spot", this.d.q());
      if (j.a().d() != null)
      {
        localHashMap.put("lpkg", j.a().d());
        j.a().d(null);
      }
      if (j.a().f() != null)
        localHashMap.put("or", j.a().f());
      if (j.a().g() != null)
        localHashMap.put("orv", j.a().g());
      if ((F.b(this.e)) && (q.A(this.e) != null))
      {
        b.b("des encode dma:" + q.A(this.e).toUpperCase() + "-->" + F.a("d!j@d#g$r%s^j&h*", q.A(this.e).toUpperCase()));
        localHashMap.put("dma", F.a("d!j@d#g$r%s^j&h*", q.A(this.e).toUpperCase()));
      }
      if ((F.b(this.e)) && (F.c(this.e)) && (q.B(this.e) != null))
      {
        b.b("des encode ama:" + q.B(this.e).toUpperCase() + "-->" + F.a("d!j@d#g$r%s^j&h*", q.B(this.e).toUpperCase()));
        localHashMap.put("ama", F.a("d!j@d#g$r%s^j&h*", q.B(this.e).toUpperCase()));
      }
      return F.a(localHashMap);
      localHashMap.put("d[coord_status]", String.valueOf(q.d()));
    }
  }

  protected void a()
  {
    b.b("Start to request ad.");
    String str = b();
    b.a("Ad req string:" + str);
    this.c = new p(this.e, j.a().b(), "", null, "POST", str, 20000, this);
    this.c.b();
  }

  public void a(p paramp)
  {
    String str = paramp.e();
    if ((str != null) && (str.length() != 0))
      b.a("Ad resp string:" + str);
    for (l locall = l.a(str); ; locall = null)
    {
      this.d.a(locall, paramp.f());
      return;
      b.e("Ad respStr is null.");
    }
  }

  static abstract interface a
  {
    public abstract void a(l paraml, int paramInt);
  }
}

/* Location:           C:\Users\god\Desktop\liunianjishiben_V1.1_mumayi_3745b_dex2jar.jar
 * Qualified Name:     cn.domob.android.ads.k
 * JD-Core Version:    0.5.4
 */